import Layout from '@/layout'

const tableRouter = {
  path: '/tms',
  component: Layout,
  redirect: '/tms/order/publish',
  name: 'transport',
  meta: {
    title: 'transport',
    icon: 'icon'
  },
  children: [{
    path: 'review',
    component: () =>
      import('@/views/tms/review/index'), // Parent router-view
    name: 'transport1',
    meta: {
      title: 'transport1'
    },
    redirect: '/tms/review/carrierReview',
    children: [{
      // 承运商审核
      path: 'carrierReview',
      component: () =>
        import('@/views/tms/review/carrierReview'),
      name: 'carrierReview',
      meta: {
        title: 'carrierReview'
      }
    },
    {
      // 托运方审核
      path: 'shipperReview',
      component: () =>
        import('@/views/tms/review/shipperReview'),
      name: 'shipperReview',
      meta: {
        title: 'shipperReview'
      }
    },
    {
      path: 'carRepair',
      component: () =>
        import('@/views/tms/review/carRepair'),
      name: 'carRepair',
      meta: {
        title: 'carRepair'
      }
    },
    {
      path: 'caiWuKaiPiao',
      component: () =>
        import('@/views/tms/review/caiWuKaiPiao'),
      name: 'caiWuKaiPiao',
      meta: {
        title: 'caiWuKaiPiao'
      }
    },
    {
      path: 'duiZhang',
      component: () =>
        import('@/views/tms/review/duiZhang'),
      name: 'duiZhang',
      meta: {
        title: 'duiZhang'
      }
    },
    {
      // 车辆维修审核
      path: 'carRepairReview',
      component: () =>
        import('@/views/tms/review/carRepairReview'),
      name: 'carRepairReview',
      meta: {
        title: 'carRepairReview'
      }
    },
    {
      path: 'financeReview',
      component: () =>
        import('@/views/tms/review/financeReview'),
      name: 'financeReview',
      meta: {
        title: 'financeReview'
      }
    },
    {
      // 对账审核
      path: 'duizhangReview',
      component: () =>
        import('@/views/tms/review/duizhangReview'),
      name: 'duizhangReview',
      meta: {
        title: 'duizhangReview'
      }
    }
    ]
  },
  {
    path: 'order',
    component: () =>
      import('@/views/tms/order/index'), // Parent router-view
    name: 'order',
    meta: {
      title: 'order'
    },
    redirect: '/transport/order/publish',
    children: [{
      // 发布货源
      path: 'order_publish',
      component: () =>
        import('@/views/tms/order/publish'),
      name: 'order_publish',
      meta: {
        title: 'order_publish'
      }
    },
    {
      path: 'order_manage',
      component: () =>
        import('@/views/tms/order/manage'),
      name: 'order_manage',
      meta: {
        title: 'order_manage'
      }
    },
    {
      // 货源审核
      path: 'cargoaudit',
      component: () =>
        import('@/views/tms/order/cargoaudit'),
      name: 'cargoaudit',
      meta: {
        title: 'cargoaudit'
      }
    },
    {
      path: 'order_hall',
      component: () =>
        import('@/views/tms/order/hall'),
      name: 'order_hall',
      meta: {
        title: 'order_hall'
      }
    }
    ]
  },
  {
    path: 'transportManage',
    component: () =>
      import('@/views/tms/transportManage/index'), // Parent router-view
    name: 'transportManage',
    meta: {
      title: 'transportManage'
    },
    redirect: '/tms/transportManage/waybillManage',
    children: [{
      // 运单管理
      path: 'waybillManage',
      component: () =>
        import('@/views/tms/transportManage/waybillManage'),
      name: 'waybillManage',
      meta: {
        title: 'roleyunsas'
      }
    },
    {
      path: 'supplement',
      component: () =>
        import('@/views/tms/transportManage/menu2-2'),
      name: 'dragTable',
      meta: {
        title: 'dragTable'
      }
    },
    {
      // 运输单
      path: 'Transport',
      component: () =>
        import('@/views/tms/transportManage/menu2-3'),
      name: 'inlineEditTable',
      meta: {
        title: 'inlineEditTable'
      }
    }

    ]
  },
  {
    path: 'advance',
    component: () =>
      import('@/views/tms/PayInAdvance/index'), // Parent router-view
    name: 'transport4',
    meta: {
      title: 'transport4'
    },
    redirect: '/transport/PayInAdvance/PrepaidManagement',
    children: [{
      // 预付运费管理
      path: 'management',
      component: () =>
        import('@/views/tms/PayInAdvance/PrepaidManagement'),
      name: 'dyable',
      meta: {
        title: 'dyable'
      }
    },
    {
      path: 'prepayment',
      component: () =>
        import('@/views/tms/PayInAdvance/PrepaidStatistics'),
      name: 'dyable2',
      meta: {
        title: 'dyable2'
      }
    }
    ]
  },
  {
    path: 'accounting',
    component: () =>
      import('@/views/tms/CarrierSettlement/index'), // Parent router-view
    name: 'dyable3',
    meta: {
      title: 'dyable3'
    },
    redirect: '/transport/CarrierSettlement/CarrierLiquidation',
    children: [{
      path: 'Carrier',
      component: () =>
        import('@/views/tms/CarrierSettlement/CarrierLiquidation'),
      name: 'rolePer',
      meta: {
        title: 'rolePer'
      },
      children: [{
        // 运费核算
        path: 'freight',
        component: () =>
          import('@/views/tms/CarrierSettlement/CarrierLiquidation/FreightAccounting'),
        name: 'dyable4',
        meta: {
          title: 'dyable4'
        }
      },
      {
        path: 'MakeMoney',
        component: () =>
          import('@/views/tms/CarrierSettlement/CarrierLiquidation/ApplicationForPayment'),
        name: 'payment',
        meta: {
          title: 'payment'
        }
      },
      {
        path: 'Receipt',
        component: () =>
          import('@/views/tms/CarrierSettlement/CarrierLiquidation/ReceiptReceipt'),
        name: 'articleList3',
        meta: {
          title: 'articleList3'
        }
      },
      {
        // 财务审批
        path: 'Approval',
        component: () =>
          import('@/views/tms/CarrierSettlement/CarrierLiquidation/Financialapproval'),
        name: 'articleList',
        meta: {
          title: 'articleList'
        }
      }
      ]
    },
    {
      path: 'UpperReaches',
      component: () =>
        import('@/views/tms/CarrierSettlement/ShipperUpstreamCustomer'),
      name: 'rolePer1',
      meta: {
        title: 'rolePer1'
      },
      children: [{
        // 收款对账
        path: 'Receivables',
        component: () =>
          import('@/views/tms/CarrierSettlement/ShipperUpstreamCustomer/Reconciliation'),
        name: 'settlement2',
        meta: {
          title: 'settlement2'
        }
      },
      // 对账列表
      {
        path: 'ReconciliationList',
        component: () => import('@/views/tms/CarrierSettlement/ShipperUpstreamCustomer/duizhangList'),
        name: 'duiList',
        meta: {
          title: 'duiList'
        }
      },
      // 收款单
      {
        path: 'receipt',
        component: () =>
          import('@/views/tms/CarrierSettlement/ShipperUpstreamCustomer/receiptd'),
        name: 'directivePermission2',
        meta: {
          title: 'directivePermission2'
        }
      },
      // 收款单列表
      {
        path: 'receiptList',
        component: () =>
          import('@/views/tms/CarrierSettlement/ShipperUpstreamCustomer/receiptListd'),
        name: 'rolePermission32',
        meta: {
          title: 'rolePermission32'
        }
      }
      ]
    }
    ]
  },
  {
    path: 'carlessCarrierReporting',
    component: () =>
      import('@/views/tms/carlessCarrierReporting'), // Parent router-view
    name: 'bbbb1',
    meta: {
      title: 'bbbb1'
    },
    redirect: '/transport/carlessCarrierReporting/electronicRoadBillReport',
    children: [{
      path: 'electronicRoadBillReport',
      component: () =>
        import('@/views/tms/carlessCarrierReporting/electronicRoadBillReport'),
      name: 'bbbb2',
      meta: {
        title: 'bbbb2'
      }
    },
    {
      path: 'fundFlowReporting',
      component: () =>
        import('@/views/tms/carlessCarrierReporting/fundFlowReporting'),
      name: 'bbbb3',
      meta: {
        title: 'bbbb3'
      }
    }
    ]
  },
  {
    path: 'invoice',
    component: () =>
      import('@/views/tms/invoice/index'), // Parent router-view
    name: 'create34',
    meta: {
      title: 'create34'
    },
    redirect: '/tms/invoice/index',
    children: [{
      path: 'translateinvoice',
      component: () =>
        import('@/views/tms/invoice/translateinvoice/invoiceList'),
      name: 'create22',
      meta: {
        title: 'create22'
      }
    },
    {
      // 发票列表
      path: 'drawInvoice',
      component: () =>
        import('@/views/tms/invoice/drawInvoice/invoiceList'),
      name: 'createArticle2',
      meta: {
        title: 'createArticle2'
      }
    }
    ]
  },
  {
    path: 'account',
    component: () =>
      import('@/views/tms/AccountManagement/index'), // Parent router-view
    name: 'rolePer2',
    meta: {
      title: 'rolePer2'
    },
    redirect: '/transport/AccountManagement/AccountBalanceStatistics',
    children: [{
      // 账户余额统计
      path: 'Balance',
      component: () =>
        import('@/views/tms/AccountManagement/AccountBalanceStatistics'),
      name: 'rolePer3',
      meta: {
        title: 'rolePer3'
      }
    },
    {
      // 账户充值
      path: 'Recharge',
      component: () =>
        import('@/views/tms/AccountManagement/recharge'),
      name: 'rolePer4',
      meta: {
        title: 'rolePer4'
      }
    },
    {
      path: 'changeList',
      component: () =>
        import('@/views/tms/AccountManagement/AccountChangeRecord'),
      name: 'rolePer5',
      meta: {
        title: 'rolePer5'
      }
    },
    {
      path: 'LoanList',
      component: () =>
        import('@/views/tms/AccountManagement/CashWithdrawal'),
      name: 'rolePer6',
      meta: {
        title: 'rolePer6'
      }
    }
    ]
  },
  {
    path: 'CustomerService',
    component: () =>
      import('@/views/tms/CustomerService/index'), // Parent router-view
    name: 'transport10',
    meta: {
      title: 'transport10'
    },
    redirect: '/transport/CustomerService/AbnormalTransportation',
    children: [{
      // 运输异常
      path: 'AbnormalTran',
      component: () =>
        import('@/views/tms/CustomerService/AbnormalTransportation'),
      name: 'cccc0',
      meta: {
        title: 'cccc0'
      }
    },
    {
      // 投诉
      path: 'Complaint',
      component: () =>
        import('@/views/tms/CustomerService/Complaint'),
      name: 'cccc1',
      meta: {
        title: 'cccc1'
      }
    },
    {
      path: 'Feedback',
      component: () =>
        import('@/views/tms/CustomerService/Feedback'),
      name: 'cccc2',
      meta: {
        title: 'cccc2'
      }
    },
    {
      // 司机星级统计
      path: 'StarStatistics',
      component: () =>
        import('@/views/tms/CustomerService/StarStatistics'),
      name: 'cccc3',
      meta: {
        title: 'cccc3'
      }
    },
    {
      path: 'OrderStatistics',
      component: () =>
        import('@/views/tms/CustomerService/OrderStatistics'),
      name: 'cccc4',
      meta: {
        title: 'cccc4'
      }
    },
    {
      // 入驻商星级统计
      path: 'StarStatistics2',
      component: () =>
        import('@/views/tms/CustomerService/StarStatistics2'),
      name: 'cccc5',
      meta: {
        title: 'cccc5'
      }
    }
    ]
  }
  ]
}

export default tableRouter
